<template>
  <div class="payment">
    <van-nav-bar title="支付" left-text="返回" left-arrow @click-left="GoBack">
      <template #right>
        <van-icon name="ellipsis" size="18" />
      </template>
    </van-nav-bar>
    <!-- <div class="goodsList">
      <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
        <van-list
          v-model="loading"
          :finished="finished"
          finished-text="没有更多了"
          @load="onLoad"
        >
          <div
            v-for="(item, index) in goodsList"
            :key="index"
            @click="goGoodsDetail(item.proid)"
            class="result-list"
          >
            <div class="image">
              <img :src="item.img1" alt="" />
            </div>
            <div class="introduce">
              <p class="text">{{ item.proname }}</p>
              <p>￥{{ item.originprice }}</p>
            </div>
          </div>
        </van-list>
      </van-pull-refresh>
    </div> -->
  </div>
</template>

<script>
export default {
  name: "payMent",
  data() {
    return {
      goodslist: [],
    };
  },
  
  methods: {
    GoBack() {
      this.$router.go(-1);
    },
    onLoad() {
      // 异步更新数据
      // setTimeout 仅做示例，真实场景中一般为 ajax 请求
      setTimeout(() => {
        for (let i = 0; i < 10; i++) {
          this.list.push(this.list.length + 1);
        }

        // 加载状态结束
        this.loading = false;

        // 数据全部加载完成
        if (this.list.length >= 40) {
          this.finished = true;
        }
      }, 1000);
    },
    onRefresh() {
      // 清空列表数据
      this.finished = false;

      // 重新加载数据
      // 将 loading 设置为 true，表示处于加载状态
      this.loading = true;
      this.onLoad();
    },
  },
};
</script>

<style scoped>
</style>